package com.estate.service.unit;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.estate.mapper.UnitMapper;
import com.estate.pojo.Unit;

@Service
public class UnitServiceImpl implements UnitService {
	
	@Autowired
	private UnitMapper unitMapper;

	@Override
	public Boolean addUnit(Unit unit) {
		try {
			int num = unitMapper.insert(unit);
			if(num > 0){
				return true;
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
		return false;
	}

}
